<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>职务</title>
<script type="text/javascript" src="static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/easyui/themes/material/easyui.css">
<style type="text/css">
	a{
		text-decoration:none;
	}
	ul li{
		list-style: none;
	}
	.bianji-neirong{
		margin-top:20px;
		text-align: center;
	}
	/* 表格里面的编辑按钮 */
	.jobchage-bianji{
		color: #19AA8D;
		border:1px solid #1AB394;
	}
	.jobchage-shanchu{
		color: red;
		border:1px solid #1AB394;
	}
</style>
</head>
<body>
	<script type="text/javascript">
		/* 编辑窗口 */
		function deittjobchage(jobchageId){
			alert(jobchageId);
			 $("#zwbj-form").form('load','jobchage-bjxx?jobchageId='+jobchageId);
			$("#jobchage-bianji").show();
			//初始化表单
			$("#bj-gb").linkbutton({onClick : function(){
				$("#jobchage-bianji").hide();
			}});
		}	
		/* 新增窗口 */
		function addDepart(i){
			$("#addck-jobchage").show();
			$("#add-gb").linkbutton({onClick : function(){
				$("#addck-jobchage").hide();
			}});y
		}
		/*删除*/
		function scjobchage(jobchageId){
			alert("删除成功");
			var id=jobchageId;
			$("#jobchage-tableform").form('load','delete-jobchage?jobchageId='+id);
		}
	$(function(){
		$('#table-jobchage').datagrid({
		    url:'jobchage_list',
		    columns:[[
				{field:'jobchageId',title:'职务编号',width:200,align:'center'},
				{field:'jobchageName',title:'职务名称',width:350,align:'center'},
				{field:'jobchage_Rank',title:'职级',width:350,align:'center'},
				{field:'caozuo',title:'操作',width:350,align:'center',
					formatter: function(value,row,index){
						return "<input type='button' onclick='deittjobchage("+row['jobchageId']+")' style='width: 45px;height: 20px;font-size:12px;border-radius:4px;margin-right:5px;color:#fff;background-color:#18A689;border:1px solid #18A689;' value='编辑'/>"+"<input type='button' onclick='scjobchage("+row['jobchageId']+")' style='width: 45px;height: 20px;font-size:12px;border-radius:4px;color:#fff;background-color:#18A689;border:1px solid #18A689;' value='删除'/>";
					},
				}
		    ]],
		    pagination:true,
		    pageNumber:1,
		    pageSize:5,
		    pageList:[5,10,15]
		});
		
		/* 新增职务 */
		$("#qd-jobchage").click(function(){
			alert(1);
			$("#form").submit();
			$("#form").form("clear")
			$("#addck-jobchage").hide();
			
		});
		/* 编辑确定 */
		$("#bj-jobchage").click(function(){
			$("#zwbj-form").submit();
			$("#zwbj-form").form("clear");
			$("#jobchage-bianji").hide();
		});
	});
</script>
    <a id="xz-jobchage" onClick="addDepart(this)" class="easyui-linkbutton" data-options="iconCls:'icon-add',width:150">新增</a>
	<Form action="" id="jobchage-tableform" method="get">
		<table id="table-jobchage" style="height: 560px;">
		</table>  
	</Form>

<!-- 	点击编辑进入窗口-->	
	<!-- <div id="jobchage-bianji" class="easyui-window" title="编辑" style="width:500px;height:200px;text-align: center;"   
        data-options="iconCls:'icon-save',modal:true">   
        	<div class="bianji-neirong">
        		*职务编号 :<input type="text" /><br/><br/>
				*职务名称 :<input type="text" /><br/><br/>
				*职务等级 :<input type="text" /><br/><br/>
			</div>
			<a id="jobchage-gb" class="easyui-linkbutton">关闭</a>
			<a href="#" class="easyui-linkbutton">保存</a>
</div>   -->
 <div id="jobchage-bianji" style="width:1366px;height:736px;position:fixed; top:0px;
	background: rgba(0, 0, 0, 0.5);text-align:center;left:0;z-index:10;display:none;" >
		<div style="width:1366px;height:736px;position:fixed; top:0px;z-index:10;">
			<div style="margin:20px auto;width:500px;height:180px;background:white;border-radius:3px;">
				<div style="width:100%;height:30px;">
					<span style="width:50px;height:30px;line-height:30px;display:inline-block;float:left;margin-left:20px;">编辑</span>
				</div>
				<div style="width:100%;height:115px;border-top:solid 1px #E5E5E5;border-bottom:solid 1px #E5E5E5;">
				 <Form  action="jobchage-xiugai" id="zwbj-form" method="post">
		        		职务编号 :<input name="jobchageId" class="easyui-textbox" data-options="required:true,width:200"/><br/><br/>
						职务名称 :<input name="jobchageName" class="easyui-textbox" data-options="required:true,width:200"/><br/><br/>
						职务等级 :<input name="jobchage_Rank" class="easyui-textbox" data-options="required:true,width:200"/><br/><br/>
					<a id="bj-gb" class="easyui-linkbutton">关闭</a>
					<a id="bj-jobchage"  class="easyui-linkbutton">确定</a>
				 </Form>
				</div>
			</div>
		</div>
</div> 
<!-- 新增窗口 -->
<div id="addck-jobchage" style="width:1366px;height:736px;position:fixed; top:0px;
	background: rgba(0, 0, 0, 0.5);text-align:center;left:0;z-index:10;display:none;" >
		<div style="width:1366px;height:736px;position:fixed; top:0px;z-index:10;">
			<div style="margin:20px auto;width:500px;height:180px;background:white;border-radius:3px;">
				<div style="width:100%;height:30px;">
					<span style="width:50px;height:30px;line-height:30px;display:inline-block;float:left;margin-left:20px;">新增</span>
				</div>
				<div style="width:100%;height:115px;border-top:solid 1px #E5E5E5;border-bottom:solid 1px #E5E5E5;">
				 <Form  action="add-jobchage" id="form" method="post">
		        		职务编号 :<input name="jobchageId" class="easyui-textbox" data-options="required:true,width:200"/><br/><br/>
						职务名称 :<input name="jobchageName" class="easyui-textbox" data-options="required:true,width:200"/><br/><br/>
						职务等级 :<input name="jobchage_Rank" class="easyui-textbox" data-options="required:true,width:200"/><br/><br/>
					<a id="add-gb" class="easyui-linkbutton">关闭</a>
					<input type="button" id="qd-jobchage" value="确定" width="100px"/>
				 </Form>
				</div>
			</div>
		</div>
</div>
 
<!--  点击新增进入窗口 
 <div id="addck-jobchage" class="easyui-window" title="新增" style="width:500px;height:200px;text-align: center;"></div>  -->
</body>
</html>